package com.h3c.nem.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.h3c.nem.enums.CareInfoType;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Table;
import java.util.Date;

/**
 * 新员工关怀未创建信息
 *
 * @author z22968
 * @date 2022/6/8 16:37
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "tb_care_no_info")
public class TbCareNoInfo {

    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    // 新员工工号
    @Column(name = "worker_id")
    private String workerId;

    // 原因
    @Column(name = "reason")
    private String reason;

    // 创建人
    @Column(name = "created_by")
    @TableField(fill = FieldFill.INSERT)
    private String createdBy;

    // 创建时间
    @Column(name = "created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="Asia/Shanghai")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    // 更新人
    @Column(name = "update_by")
    @TableField(fill = FieldFill.UPDATE)
    private String updateBy;

    // 更新时间
    @Column(name = "update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="Asia/Shanghai")
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    @Getter
    @AllArgsConstructor
    public enum ReasonType {
        NO_ASSIGN_DEPT("未分配部门");
        private String value;
    }

}
